package com.fy.service.impl;

import com.fy.entity.Log;
import com.fy.mapper.LogMapper;
import com.fy.service.ILogService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 晓岩
 * @since 2022-06-12
 */
@Service
public class LogServiceImpl extends ServiceImpl<LogMapper, Log> implements ILogService {

    @Async
    public void saveAop(Log log) throws InterruptedException {
        System.out.println("保存开始");
        Thread.sleep(5000);
        this.save(log);
        System.out.println("保存结束");
    }
}
